package com.daniel.juc.function;

import java.util.function.Supplier;

/**
 * Supplier 供给型接口：没有输入参数，只有返回
 *
 * @author Daniel
 * @version V1.0
 * @date 2020/5/21 11:31
 */
public class Demo04 {
	public static void main(String[] args) {
		// Supplier<String> supplier = new Supplier<String>() {
		// 	@Override
		// 	public String get() {
		// 		return "hello world";
		// 	}
		// };

		Supplier<String> supplier = () -> "hello kim";

		System.out.println(supplier.get());
	}
}
